package com.kantboot.api.lbs.domain.entity;

import jakarta.persistence.*;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;

import java.io.Serializable;
import java.util.Date;

/**
 * lbs位置信息表
 */
@Table(name = "api_lbs_ad")
@Entity
@Getter
@Setter
@Accessors(chain = true)
@EntityListeners(AuditingEntityListener.class)
public class ApiLbsAd implements Serializable {

    /**
     * 主键
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id")
    private Long id;


    /**
     * ip
     */
    @Column(name = "ip")
    private String ip;

    /**
     * 纬度
     */
    @Column(name = "lat")
    private String lat;

    /**
     * 经度
     */
    @Column(name = "lng")
    private String lng;

    /**
     * 国家
     */
    @Column(name = "country")
    private String country;

    /**
     * 省份
     */
    @Column(name = "province")
    private String province;

    /**
     * 城市
     */
    @Column(name = "city")
    private String city;

    /**
     * 区县
     */
    @Column(name = "district")
    private String district;

    /**
     * 街道
     */
    @Column(name = "street")
    private String street;

    /**
     * 位置编号
     */
    @Column(name = "adcode")
    private String adcode;

    /**
     * 位置
     */
    @Column(name = "address")
    private String address;

    /**
     * 创建时间
     */
    @CreatedDate
    @Column(name = "gmt_create")
    private Date gmtCreate;

    /**
     * 修改时间
     */
    @LastModifiedDate
    @Column(name = "gmt_modified")
    private Date gmtModified;


}
